add include guard for src/core/optional.h (#290)
authortsteven4 <tsteven4@users.noreply.github.com>
Fri, 28 Dec 2018 17:14:33 +0000 (10:14 -0700)
committerGitHub <noreply@github.com>
Fri, 28 Dec 2018 17:14:33 +0000 (10:14 -0700)
csv_util.cc
src/core/optional.h

index 84fd98bfa4c38020380a3f1090a0a106e503e318..af959182d435d35d0a1d81de27037a7bc1165f20 100644 (file)
@@ -32,6 +32,7 @@
 #include "grtcirc.h"
 #include "jeeps/gpsmath.h"
 #include "src/core/logging.h"
+#include "src/core/optional.h"
 #include "strptime.h"
 
 #include <cmath>
index 0357fb7564b8c686d163a1a675798f435c6478e1..72f896b4b7d5387bf67ec3ea7054823bb8df9bc0 100644 (file)
@@ -23,6 +23,9 @@
 // 1. 'gpsbabel_optional::optional' to 'std::optional',
 // 2. 'include "optional.h"' becomes 'include <optional>'.
 
+#ifndef GPSBABEL_OPTIONAL_H_INCLUDED_
+#define GPSBABEL_OPTIONAL_H_INCLUDED_
+
 #if __cplusplus >= 201703L
 #warning "using std::optional"
 #include <optional>
@@ -250,3 +253,4 @@ constexpr bool operator>=(const T& value, const optional<U>& opt)
 } // namespace
 #endif
 
+#endif // GPSBABEL_OPTIONAL_H_INCLUDED_